using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Web.SessionState;

public static class CommonHelper
{
    public static bool ShowHiddenCustomers() {
        HttpSessionState session = HttpContext.Current.Session;
        return (session["hiddenCustomers"] != null && Convert.ToBoolean(session["hiddenCustomers"]) == true);
    }

    public static int GetInformalVisibility()
    {
        HttpSessionState session = HttpContext.Current.Session;
        if (session["informal"] == null)
        {
            session["informal"] = 0;
        }

        return Convert.ToInt16(session["informal"]);
    }

    public static string getHeaderClassName() {
        string result = String.Empty;

        if (ShowHiddenCustomers()) {
            result = "privateHeader";
        }
        else {
            result = "header";            
        }

        return result;
    }

    public static void ChangeHiddenCustomers() {
        
        HttpSessionState session = HttpContext.Current.Session;

        if (session["hiddenCustomers"] == null || Convert.ToBoolean(session["hiddenCustomers"]) == false) {
            session["hiddenCustomers"] = true;
        }
        else {
            session["hiddenCustomers"] = false;
        }
    }
}
